<table title="">
<tbody>
{% for upload in uploads %}
<tr id="uploads_{{ loop.index }}" class="uploads">
<td class="uploads_name filename main">
{% if ["jpg", "jpeg", "png", "gif", "webp"] | contains(upload.type) %}
{{ upload.name | thumbnail("", false, ["max_width=70", "quality=60", "square=1"], "70px") }}
{% set file_url = site.chyrp_url ~ "/includes/thumbnail.php?file=" ~ (upload.name | url_encode) %}
{% elseif ["avif", "tif", "tiff", "bmp"] | contains(upload.type) %}
{{ icon_svg("image.svg", false, "placeholder") }}
{% set file_url = site.chyrp_url ~ "/includes/thumbnail.php?file=" ~ (upload.name | url_encode) %}
{% elseif ["mp3", "m4a", "oga", "ogg", "mka", "flac", "wav"] | contains(upload.type) %}
{{ icon_svg("audio.svg", false, "placeholder") }}
{% set file_url = upload.name | uploaded %}
{% elseif ["mpg", "mpeg", "mp2", "mp4", "m4v", "ogv", "mkv",  "mov", "avi", "webm", "3gp", "ts"] | contains(upload.type) %}
{{ icon_svg("video.svg", false, "placeholder") }}
{% set file_url = upload.name | uploaded %}
{% elseif ["zip", "tar", "rar", "gz", "bz2", "7z", "dmg", "cab", "iso", "udf"] | contains(upload.type) %}
{{ icon_svg("archive.svg", false, "placeholder") }}
{% set file_url = upload.name | download %}
{% else %}
{{ icon_svg("file.svg", false, "placeholder") }}
{% set file_url = upload.name | download %}
{% endif %}
<a data-name="{{ upload.name }}" data-type="{{ upload.type }}" data-size="{{ upload.size }}" href="{{ file_url }}">
{{ upload.name | fix }}
</a>
</td>
</tr>
{% else %}
<tr>
<td class="placeholder">
{{ icon_svg("failure.svg", false, "emblem") }}
{{ "No results" | translate }}
</td>
</tr>
{% endfor %}
</tbody>
</table>
